package com.jmyd.commons.redis.repository;

import org.springframework.stereotype.Repository;

import java.util.concurrent.TimeUnit;


@Repository
public class StringRedisHelper extends BaseRedisRepositoryImpl<String> {

    /**
     * 设置过期时间
     *
     * @param key        指定key
     * @param expireTime 过期时间
     * @param timeUnit   时间单位
     * @author samphin
     * @date 2021-3-26 14:55:34
     */
    public void expire(String key, long expireTime, TimeUnit timeUnit) {
        redisTemplate.expire(key, expireTime, timeUnit);
    }
}
